<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <template id="t1">
      <div>
        <ul v-for="num in nums">
          <li v-for=" v in even(num)">{{v}}</li>
        </ul>
      </div>
    </template>
    <script src="./vue.js"></script>
    <script>
      const vm = new Vue({
        el: "#app",
        template: "#t1",
        data: {
          nums: [
            [1, 2, 3, 4, 5, 6, 7, 8],
            [9, 10, 11, 12, 13, 14],
          ],
        },
        methods: {
          even(arr) {
            return arr.filter((el) => el % 2 === 0);
          },
        },
      });
    </script>
  </body>
</html>
